class Factory extends eui.Component{
	private frameItem:FrameItem;
	constructor(){
		super();
		this.skinName="skins.scene.FactorySkin";
		this.name = "guildFactory";
		this.frameItem = new FrameItem(this, this.update);
		// this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAdded, this );
		// this.addEventListener(egret.Event.REMOVED_FROM_STAGE, this.onRemoved, this);
	}
	public update(){
		// if( !GuildMgr.getInstance().machines) return;

		// for(var i=1 ; i <=6;i++){
		// 	if( this.isMine){
		// 		var machine = GuildMgr.getInstance().machines[i];
		// 	}else{
		// 		machine = this.visitMachines[i];
		// 	}
		// 	this.updateMachine(machine,false);
		// }
	}
	private isMine:boolean;
	/**
	 * state枚举值
	 * 1	未解锁
	 * 2	已解锁
	 * 4	闲置中
	 * 8	制作中
	 * 16	可收取
	 * 32	升级中
	 * 64	可保养
	 * */
	// public onMachineBack(machines){
	// 	this.isMine = true;
	// 	this.lab_title.text = "我的工坊";
	// 	GuildMgr.getInstance().setMachines(machines);
	// 	var machine;
	// 	for(var i = 0; i < 6; i++){
	// 		machine = machines[i];
	// 		this.updateMachine(machine);
	// 	}
	// }
	// private refreshSent = false;
	// private updateMachine(machine,breakOnLock=false){
	// 	if( machine.producing){
	// 		EffectMgr.getInstance().playEffect("machie_anim"+(machine.machineId-1),-1);
	// 	}else{
	// 		EffectMgr.getInstance().stopEffectByName("machie_anim"+(machine.machineId - 1));
	// 	}


	// 	var index = machine.machineId;
	// 	this["maintance_"+(index-1)].visible = machine.maintain;
	// 	if( !machine.unLock && breakOnLock && this.isMine) return;
	// 	if(index != 1){
	// 		this["lock_"+(index-2)].visible = !machine.unLock;
	// 		this["base_"+(index-2)].visible = !machine.unLock;
	// 	}

	// 	this["machine_"+(index-1)].visible = machine.unLock;
	// 	if( !machine.unLock ){
	// 		if( machine.machineId < 4){
	// 			this["lab_m_"+(index-1)].text = "工坊"+GuildMgr.getInstance().getMachineUnlockLevel(index)+"级解锁";
	// 		}else{
	// 			this["lab_m_"+(index-1)].text = +GuildMgr.getInstance().unlockMachineCost[Model.userExt.unlockMachineTimes]+"钻石解锁";
	// 		}
	// 		this["lab_lv_"+(index-1)].text = "";
	// 	}else if( machine.producing ){
	// 		var goodInfo:GoodInfo = Model.GetGoodInfoById(machine.goodsId);
	// 		if(machine.produceFinishTime > Model.SYSTIME )
	// 			this["lab_m_"+(index-1)].text = "正在生产"+goodInfo.name+"\r"+GetTimeStr(machine.produceFinishTime - Model.SYSTIME);
	// 		else{
	// 			if( !this.refreshSent){
	// 				window["__refreshMachine"](this.isMine ? Model.me.id : this.visitor, machine.machineId);
	// 				this.refreshSent = true;
	// 			}
	// 		}
	// 	}else if( machine.upgrading ){
	// 		if(machine.upgradeFinishTime > Model.SYSTIME )
	// 			this["lab_m_"+(index-1)].text = "升级改造中\r"+GetTimeStr(machine.upgradeFinishTime - Model.SYSTIME);
	// 		else{
	// 			if( !this.refreshSent){
	// 				window["__refreshMachine"](this.isMine ? Model.me.id : this.visitor, machine.machineId);
	// 				this.refreshSent = true;
	// 			}
	// 		}
	// 	}else if(machine.reap){
	// 		this["lab_m_"+(index-1)].text = "可收取";
	// 	}else{
	// 		this["lab_m_"+(index-1)].text = "闲置中";
	// 	}
	// 	if( machine.unLock )
	// 		this["lab_lv_"+(index-1)].text = "Lv."+machine.level;
	// }
	// private currentSelectIndex;
	// private currentMachine;
	// private onTouchMachine(evt:egret.TouchEvent){
	// 	this.group_mine.visible = this.isMine;
	// 	this.group_other.visible = !this.isMine;
	// 	this.currentSelectIndex = parseInt(evt.target.name);
	// 	if( this.isMine){
	// 		this.currentMachine = GuildMgr.getInstance().machines[this.currentSelectIndex+1];
	// 	}else{
	// 		this.currentMachine = this.visitMachines[this.currentSelectIndex+1];
	// 	}

	// 	if( this.isMine){
	// 		this.group_mine.x = evt.localX+evt.target.x;
	// 		this.group_mine.y = evt.localY+evt.target.y - 10;
	// 	}else{
	// 		this.group_other.x = evt.localX+evt.target.x;
	// 		this.group_other.y = evt.localY+evt.target.y-10;
	// 	}
	// }

	// private onProduce(evt:egret.TouchEvent){
	// 	if( this.currentMachine.producing){
	// 		ShowHint("正在制作产品，请不要打扰机器");
	// 		return;
	// 	}else if( this.currentMachine.reap ){
	// 		ShowHint("有产品未收取");
	// 		return;
	// 	}else if( this.currentMachine.upgrading ){
	// 		ShowHint("升级中");
	// 		return;
	// 	}
	// 	MachineProduce.getInstance().show(this.currentSelectIndex+1);
	// }
	// private onGet(evt:egret.TouchEvent){
	// 	if( !this.currentMachine.reap){
	// 		ShowHint("机器还什么都没制作呢");
	// 		return;
	// 	}
	// 	window["__getMachinProduct"](this.currentMachine.machineId);
	// }
	// private onStop(evt:egret.TouchEvent){
	// 	if( !this.currentMachine.producing){
	// 		ShowHint("机器还什么都没制作呢");
	// 		return;
	// 	}
	// 	var goodInfo:GoodInfo = Model.GetGoodInfoById(this.currentMachine.goodsId);
	// 	RemindPanel.getInstance().showContent("停工将得不到任何产品，是否立即停工？", this, this.okStop)
	// }
	// private okStop(){
	// 	window["__stopMachineProduce"](this.currentMachine.machineId);
	// }
	// private onUpgrade(evt:egret.TouchEvent){
	// 	if( this.currentMachine.producing){
	// 		ShowHint("正在制作产品，请不要打扰机器");
	// 		return;
	// 	}else if( this.currentMachine.reap ){
	// 		ShowHint("有产品未收取");
	// 		return;
	// 	}else if( this.currentMachine.upgrading ){
	// 		ShowHint("升级中");
	// 		return;
	// 	}
	// 	MachineUpgrade.getInstance().show(this.currentSelectIndex+1);
	// }
	// public onSpeedUpgradeBack(machine){
	// 	if( this.isMine ){
	// 		GuildMgr.getInstance().updateMachine(machine);
	// 	}else{
	// 		this.visitMachines[machine.machineId] = machine;
	// 	}
	// }
	// private onSpeedup(evt:egret.TouchEvent){
	// 	if( this.currentMachine.produceFinishTime > Model.SYSTIME){
	// 		BuyTimePanel.getInstance().show(this.currentMachine.produceFinishTime, this, this.speedMine);
	// 	}else if(this.currentMachine.upgradeFinishTime > Model.SYSTIME){
	// 		BuyTimePanel.getInstance().show(this.currentMachine.upgradeFinishTime, this, this.speedMine);
	// 	}
	// }
	// private speedMine(){
	// 	if( this.currentMachine.producing ){
	// 		window["__speedUpProduce"](Model.me.id, this.currentMachine.machineId);
	// 	}else if(this.currentMachine.upgrading ){
	// 		window["__speedMachineUpgrade"](Model.me.id,this.currentMachine.machineId);
	// 	}
	// }
	// private speedOther(){
	// 	if( this.currentMachine.producing ){
	// 		window["__speedUpProduce"](this.visitor, this.currentMachine.machineId);
	// 	}else if(this.currentMachine.upgrading ){
	// 		window["__speedMachineUpgrade"](this.visitor, this.currentMachine.machineId);
	// 	}
	// }
	// private onRefuel(evt:egret.TouchEvent){
	// 	if( this.currentMachine.producing){
	// 		window["__refuel"](this.visitor,this.currentMachine.machineId);
	// 	}else{
	// 		ShowHint("这个机器没有生产东西，不能加油。");
	// 	}
	// }
	// private onMaintance(evt:egret.TouchEvent){
	// 	if(this.currentMachine.maintain)
	// 		window["__maintain"](this.visitor,this.currentMachine.machineId);
	// 	else
	// 		ShowHint("该机器不需要保养。");
	// }
	// private onSpeedup1(evt:egret.TouchEvent){
	// 	if( this.currentMachine.producing ){
	// 		BuyTimePanel.getInstance().show(this.currentMachine.produceFinishTime, this, this.speedOther);
	// 	}else if(this.currentMachine.upgrading ){
	// 		BuyTimePanel.getInstance().show(this.currentMachine.upgradeFinishTime, this, this.speedOther);
	// 	}
	// }

	// private members;
	// private onGoHelp(evt:egret.TouchEvent){
	// 	if( !this.members)
	// 		window["__memberList"]();
	// 	else
	// 		this.getAMember();
	// }
	// public onMembers(members){
	// 	this.members = [];
	// 	var member;
	// 	for(var key in members){
	// 		member = members[key];
	// 		if( member.userId != Model.me.id){
	// 			this.members.push(member.userId);
	// 		}
	// 	}
	// 	this.getAMember();
	// }
	// private curIndex = -1;
	// private getAMember(){
	// 	var len = this.members.length;
	// 	if( len == 0){
	// 		ShowHint("没有可以帮忙的人");
	// 		return;
	// 	}
	// 	this.curIndex++;
	// 	if( this.curIndex >= len)
	// 		this.curIndex = 0;
	// 	if( this.members[this.curIndex] == this.visitor) return;
	// 	window["__visitFactory"](this.members[this.curIndex]);
	// 	this.img_go_help.source = "img_fuck_guild_55";
	// }
	// public onRefreshBack(userId,machine){
	// 	//var len = machines.length;
	// 	//var machine;
	// 	if( userId == Model.me.id){
	// 		//for(var i=0; i < len; i++){
	// 		//	machine = machines[i];
	// 			GuildMgr.getInstance().updateMachine(machine);
	// 		//}
	// 	}else{
	// 		this.visitor = userId;
	// 		//for(var i=0; i < len; i++){
	// 			//machine = machines[i];
	// 			this.visitMachines[machine.machineId] = machine;
	// 		//}
	// 	}
	// 	this.refreshSent = false;
	// }
	// private visitMachines;
	// private visitor;
	// public onVisitBack(result){
	// 	this.isMine = false;
	// 	this.visitMachines = {};
	// 	var machine;
	// 	for(var key in  result.machines){
	// 		machine = result.machines[key];
	// 		this.visitMachines[machine.machineId] = machine;
	// 	}
	// 	this.visitor = result.visitorId;
	// 	this.lab_title.text = LimitStringLen(result.visitorName)+"的工坊";
	// 	this.img_log.source = "img_fuck_guild_54";
	// }
	// public onMachineMaintance(result){
	// 	var info = result.user;
	// 	if( info ){
	// 		Model.userExt  = info;
	// 	}

	// 	var machine =  result.machine;
	// 	if( machine ){
	// 		this.visitMachines[machine.machineId] = machine;
	// 	}
	// 	var member =  result.member;
	// 	if( member ){
	// 		GuildMgr.getInstance().myMemberInfo = member;
	// 		ShowHint("您获得1800贡献");
	// 	}
	// }
	// public onMachieRefuelBack(result){
	// 	var info = result.info;
	// 	if( info ){
	// 		Model.userExt  = info;
	// 	}

	// 	var machine =  result.machine;
	// 	if( machine ){
	// 		this.visitMachines[machine.machineId] = machine;
	// 	}

	// 	var member =  result.member;
	// 	if( member ){
	// 		GuildMgr.getInstance().myMemberInfo = member;
	// 		ShowHint("您获得500贡献");
	// 	}
	// }
	// private onLog(evt:egret.TouchEvent){
	// 	if( this.isMine){
	// 		FactoryLog.getInstance().show();
	// 	}else{
	// 		this.isMine = true;
	// 		this.img_log.source = "img_fuck_guild_33";
	// 		this.img_go_help.source = "img_fuck_guild_29";
	// 		this.lab_title.text = "我的工坊";
	// 		this.visitor = 0;
	// 	}
	// }
	// private _curSelectedUnlock = 0;
	// private onUnlock(evt:egret.TouchEvent){
	// 	if( !this.isMine) return;
	// 	this._curSelectedUnlock = parseInt(evt.target.name);
	// 	RemindPanel.getInstance().showContent("是否花费"+GuildMgr.getInstance().unlockMachineCost[Model.userExt.unlockMachineTimes]+"钻石购买万能制造机-"+this._curSelectedUnlock+"号机？", this, this.onBuyOk);
	// }

	// private onBuyOk(){
	// 	if( Model.me.diamond < GuildMgr.getInstance().unlockMachineCost[Model.userExt.unlockMachineTimes]){
	// 		BuyDiamondPanel.getInstance().show();
	// 		return;
	// 	}
	// 	window["__buyMachine"](this._curSelectedUnlock);
	// }

	// private swicthShow(evt:egret.TouchEvent){
	// 	if(evt.target != this.machine_0 && evt.target != this.machine_1 && evt.target != this.machine_2 && evt.target != this.machine_3 && evt.target != this.machine_4 && evt.target != this.machine_5){
	// 		this.group_mine.visible = this.group_other.visible = false;
	// 	}
	// }
	// public onReturn(evt:egret.TouchEvent){
	// 	SceneMgr.getInstance().switchScene(SceneMgr.SCENE_GUILD);
	// }

	// private onAdded(evt:egret.Event){
	// 	this.addEventListener(egret.TouchEvent.TOUCH_TAP, this.swicthShow, this);
	// 	this.machine_0.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_1.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_2.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_3.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_4.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_5.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);

	// 	this.lock_2.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);
	// 	this.lock_3.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);
	// 	this.lock_4.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);

	// 	this.img_return.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onReturn, this);
	// 	this.img_produce.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onProduce, this);
	// 	this.img_get.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onGet, this);
	// 	this.img_stop.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onStop, this);
	// 	this.img_upgrade.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onUpgrade, this);
	// 	this.img_speedup.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onSpeedup, this);
	// 	this.img_refuel.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onRefuel, this);
	// 	this.img_maintaince.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onMaintance, this);
	// 	this.img_speedup_1.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onSpeedup1, this);
	// 	this.img_log.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onLog, this);
	// 	this.img_go_help.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onGoHelp, this);
	// 	if( GuildMgr.getInstance().machines == null)
	// 		window["__machines"]();
	// 	FrameMgr.getInstance().addControll(this.frameItem);

	// }

	// private onRemoved(evt:egret.Event){
	// 	FrameMgr.getInstance().delController(this.name);

	// 	this.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.swicthShow, this);
	// 	this.machine_0.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_1.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_2.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_3.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_4.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);
	// 	this.machine_5.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchMachine, this);

	// 	this.lock_2.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);
	// 	this.lock_3.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);
	// 	this.lock_4.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onUnlock, this);

	// 	this.img_return.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onReturn, this);
	// 	this.img_produce.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onProduce, this);
	// 	this.img_get.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onGet, this);
	// 	this.img_stop.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onStop, this);
	// 	this.img_upgrade.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onUpgrade, this);
	// 	this.img_speedup.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onSpeedup, this);
	// 	this.img_refuel.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onRefuel, this);
	// 	this.img_maintaince.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onMaintance, this);
	// 	this.img_speedup_1.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onSpeedup1, this);
	// 	this.img_log.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onLog, this);
	// 	this.img_go_help.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onGoHelp, this);
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim0");
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim1");
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim2");
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim3");
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim4");
	// 	EffectMgr.getInstance().stopEffectByName("machie_anim5");
	// }

	// public img_return:eui.Image;
	// public img_go_help:eui.Image;
	// public machine_0:eui.Image;
	// public machine_1:eui.Image;
	// public img_log:eui.Image;
	// public machine_2:eui.Image;
	// public machine_4:eui.Image;
	// public machine_3:eui.Image;
	// public machine_5:eui.Image;
	// public base_2:eui.Image;
	// public base_1:eui.Image;
	// public base_0:eui.Image;
	// public base_4:eui.Image;
	// public base_3:eui.Image;
	// public lock_2:eui.Image;
	// public lock_4:eui.Image;
	// public lock_1:eui.Image;
	// public lock_0:eui.Image;
	// public lock_3:eui.Image;
	// public lab_title:eui.Label;
	// public lab_m_0:eui.Label;
	// public lab_m_1:eui.Label;
	// public lab_m_2:eui.Label;
	// public lab_m_3:eui.Label;
	// public lab_m_4:eui.Label;
	// public lab_m_5:eui.Label;
	// public maintance_0:eui.Image;
	// public maintance_1:eui.Image;
	// public maintance_2:eui.Image;
	// public maintance_3:eui.Image;
	// public maintance_4:eui.Image;
	// public maintance_5:eui.Image;
	// public group_mine:eui.Group;
	// public img_produce:eui.Image;
	// public img_get:eui.Image;
	// public img_stop:eui.Image;
	// public img_upgrade:eui.Image;
	// public img_speedup:eui.Image;
	// public group_other:eui.Group;
	// public img_refuel:eui.Image;
	// public img_maintaince:eui.Image;
	// public img_speedup_1:eui.Image;
	// public lab_lv_0:eui.Label;
	// public lab_lv_1:eui.Label;
	// public lab_lv_2:eui.Label;
	// public lab_lv_3:eui.Label;
	// public lab_lv_4:eui.Label;
	// public lab_lv_5:eui.Label;
	// public partAdded(name:string, instance:any){
	// 	super.partAdded(name, instance);
	// 	if(name == "img_return"){
	// 		this.img_return=instance;
	// 	}else if(name == "img_go_help"){
	// 		this.img_go_help=instance;
	// 	}else if(name == "machine_0"){
	// 		this.machine_0=instance;
	// 		this.machine_0.name="0";
	// 	}else if(name == "machine_1"){
	// 		this.machine_1=instance;
	// 		this.machine_1.name="1";
	// 	}else if(name == "img_log"){
	// 		this.img_log=instance;
	// 	}else if(name == "machine_2"){
	// 		this.machine_2=instance;
	// 		this.machine_2.name="2";
	// 	}else if(name == "machine_4"){
	// 		this.machine_4=instance;
	// 		this.machine_4.name="4";
	// 	}else if(name == "machine_3"){
	// 		this.machine_3=instance;
	// 		this.machine_3.name="3";
	// 	}else if(name == "machine_5"){
	// 		this.machine_5=instance;
	// 		this.machine_5.name="5";
	// 	}else if(name == "base_2"){
	// 		this.base_2=instance;
	// 	}else if(name == "base_1"){
	// 		this.base_1=instance;
	// 	}else if(name == "base_4"){
	// 		this.base_4=instance;
	// 	}else if(name == "base_3"){
	// 		this.base_3=instance;
	// 	}else if(name == "lock_2"){
	// 		this.lock_2=instance;
	// 		this.lock_2.name="4";
	// 	}else if(name == "base_0"){
	// 		this.base_0=instance;
	// 	}else if(name == "lock_0"){
	// 		this.lock_0=instance;
	// 		this.lock_0.name="2";
	// 	}else if(name == "lock_4"){
	// 		this.lock_4=instance;
	// 		this.lock_4.name="6";
	// 	}else if(name == "lock_1"){
	// 		this.lock_1=instance;
	// 		this.lock_1.name="3";
	// 	}else if(name == "lock_3"){
	// 		this.lock_3=instance;
	// 		this.lock_3.name="5";
	// 	}else if(name == "lab_title"){
	// 		this.lab_title=instance;
	// 	}else if(name == "lab_m_0"){
	// 		this.lab_m_0=instance;
	// 	}else if(name == "lab_m_1"){
	// 		this.lab_m_1=instance;
	// 	}else if(name == "lab_m_2"){
	// 		this.lab_m_2=instance;
	// 	}else if(name == "lab_m_3"){
	// 		this.lab_m_3=instance;
	// 	}else if(name == "lab_m_4"){
	// 		this.lab_m_4=instance;
	// 	}else if(name == "lab_m_5"){
	// 		this.lab_m_5=instance;
	// 	}else if(name == "maintance_0"){
	// 		this.maintance_0=instance;
	// 	}else if(name == "maintance_1"){
	// 		this.maintance_1=instance;
	// 	}else if(name == "maintance_2"){
	// 		this.maintance_2=instance;
	// 	}else if(name == "maintance_3"){
	// 		this.maintance_3=instance;
	// 	}else if(name == "maintance_4"){
	// 		this.maintance_4=instance;
	// 	}else if(name == "maintance_5"){
	// 		this.maintance_5=instance;
	// 	}else if(name == "group_mine"){
	// 		this.group_mine=instance;
	// 	}else if(name == "img_produce"){
	// 		this.img_produce=instance;
	// 	}else if(name == "img_get"){
	// 		this.img_get=instance;
	// 	}else if(name == "img_stop"){
	// 		this.img_stop=instance;
	// 	}else if(name == "img_upgrade"){
	// 		this.img_upgrade=instance;
	// 	}else if(name == "img_speedup"){
	// 		this.img_speedup=instance;
	// 	}else if(name == "group_other"){
	// 		this.group_other=instance;
	// 	}else if(name == "img_refuel"){
	// 		this.img_refuel=instance;
	// 	}else if(name == "img_maintaince"){
	// 		this.img_maintaince=instance;
	// 	}else if(name == "img_speedup_1"){
	// 		this.img_speedup_1=instance;
	// 	}else if(name == "lab_lv_0"){
	// 		this.lab_lv_0=instance;
	// 	}else if(name == "lab_lv_1"){
	// 		this.lab_lv_1=instance;
	// 	}else if(name == "lab_lv_2"){
	// 		this.lab_lv_2=instance;
	// 	}else if(name == "lab_lv_3"){
	// 		this.lab_lv_3=instance;
	// 	}else if(name == "lab_lv_4"){
	// 		this.lab_lv_4=instance;
	// 	}else if(name == "lab_lv_5"){
	// 		this.lab_lv_5=instance;
	// 	}
	// }
	// public childrenCreated(){
	// 	super.childrenCreated();
	// 	//todo
	// }

	// public measure(){
	// 	super.measure();
	// 	//todo
	// }

	private static _instance:Factory;
	public static getInstance():Factory{
		if(Factory._instance == null){
			Factory._instance = new Factory();
		}
		return Factory._instance;
	}
}